package money

import (
	. "game_server/logic/internal"
	"game_server/model"
	"proto/money"
)

type moneyService struct {
}

func init() {
	Service.Register(new(moneyService))
}

func (*moneyService) Name() string {
	return "proto_money"
}

func (*moneyService) SyncData(player *model.Player, request *proto_money.SyncData) (err error) {
	response := new(proto_money.SyncData)
	response.Item = player.Money.ToProto()
	rpc.SyncData(player, response)

	return
}
